﻿using AutoMapper;
using B.S.DataBase.MyProject.Domain;
using B.S.DataBase.MyProject.ErrorCode;
using B.S.DataBase.MyProject.Infrastructure.Interface;
using B.S.DataBase.MyWrite.API.Appicant.Command.Approval;
using MediatR;

namespace B.S.DataBase.MyWrite.API.Appicant.CommandHandler.Approval
{
    public class ApprovalLeaveRequestsCommendHandlers : IRequestHandler<ApprovalLeaveRequestsCommends, APIResult<object>>
    {

        private readonly IBaseRepository<LeaveApplications> laRepository;
        private readonly IBaseRepository<Record> recordRepository;
        private readonly IBaseRepository<User> userRepository;
        private readonly IMapper mapper;

        public ApprovalLeaveRequestsCommendHandlers(IBaseRepository<LeaveApplications> laRepository, IBaseRepository<Record> recordRepository, IBaseRepository<User> userRepository, IMapper mapper)
        {
            this.laRepository = laRepository;
            this.recordRepository = recordRepository;
            this.userRepository = userRepository;
            this.mapper = mapper;
        }

        /// <summary>
        /// 审批请假申请
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<APIResult<object>> Handle(ApprovalLeaveRequestsCommends request, CancellationToken cancellationToken)
        {
            APIResult<object> result = new APIResult<object>();

            return Task.FromResult(result);

        }
    }
}
